import VueRouter from 'vue-router'

import homeconp from '../components/tabbar/homeconp.vue'
import carconp from '../components/tabbar/carconp.vue'
import menberconp from '../components/tabbar/menberconp.vue'
import searchconp from '../components/tabbar/searchconp.vue'
import newsList from '../components/news/newsList.vue'
import newsinfo from '../components/news/newsinfo.vue'
import photolist from '../components/photo/photolist.vue'
import photoinfo from '../components/photo/photoinfo.vue'
import goodslist from '../components/goods/goodslist.vue'
import goodsinfo from '../components/goods/goodsinfo.vue'
import goodsparams from '../components/goods/goodsparams.vue'
import goodscomments from '../components/goods/goodscomments.vue'

var router = new VueRouter({
    routes: [
        {path:'/', redirect: '/home'},
       {path: '/home', component: homeconp},
       {path: '/car', component: carconp},
       {path: '/menber', component: menberconp},
       {path: '/search', component: searchconp},
       {path: '/home/newsList', component: newsList},
        {path: '/home/newsList/newsinfo:id', component: newsinfo},
        {path:'/home/photolist', component: photolist},
        {path: '/home/photoinfo/:id',component: photoinfo},
        {path: '/home/goodslist',component: goodslist},
        {path: '/home/goodsinfo/:id',component: goodsinfo},
        {path: '/home/goodsparams/:id',component: goodsparams},
        {path: '/home/goodscomments/:id', component: goodscomments}
    ],
    linkActiveClass: 'mui-active'
})
// 把路由对象暴露出去
export default router